<?php

include 'config.inc';
include 'IO.inc';
include 'db.inc'; 
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$new_win_width = 600;
$new_win_height = 400;

function error_message($msg) {
        html_header();
        echo "<SCRIPT>alert(\"$msg\");history.go(-1)</SCRIPT>";
        html_footer();
        exit;
     }


function html_popUp() {
   global $new_win_width, $new_win_height;
   ?>
   <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
   <!--
   function open_window(url) {
      var NEW_WIN = null;
      NEW_WIN = window.open ("", "RecordViewer", "toolbar=no,width="+<?php echo $new_win_width ?>+",height="+<?php echo $new_win_height?>+",directories=no,status=no,scrollbars=yes,resize=no,menubar=no");
      NEW_WIN.location.href = url;
   }
   //-->
   </SCRIPT>
   <?php
}


function html_header()
{
    global $title;
 ?>
   <head>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title><?php echo $title ?></title>
    <?php html_popUp(); ?>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
   </head> 
 <?php 
}

function html_logo()
{
    global $titulo, $subtitulo;
 ?>
 <h1><a href="#"><?php echo $titulo ?> </a></h1>
<p><?php echo $subtitulo ?> </p>   
 <?php
}

function html_menu()
{
    global $menuItens;
    echo "<ul>"; 
    for($i = 0 ; $i < count($menuItens); $i++ )
    {
        echo "<li><a href=\"#\">$menuItens[$i]</a></li>";
        
    }
    echo "</ul>";
    
}


function html_formularioCadastro()
{
    global $show, $dataCadastro,$str_status,$nome,$descricao,$action,$UID,$publicado,$AlbumID;
    if($show){ ?>
    
                           <div class="post">
				<h2 class="title"><a href="#">Dados do Album</a></h2>
				<p class="meta"><span class="date">[<?php echo $dataCadastro ?>]</span><span class="posted">Status <a href="#"><?php echo $str_status ?></a></span></p>
				<div style="clear: both;">&nbsp;</div>
				<div class="entry">
                                    
				<form method="get" action="#">
                                    <div>
                                        <label>nome do Album</label><br />
                                        <input type="text" name="nome" id="search-text" value="<?php echo $nome ?>" /><br />
                                        <label>Descrição</label><br />
                                        <input type="text" name="descricao" id="search-text" value="<?php echo $descricao ?>" /><br />
                                        <input type="hidden" name="url" value="<?php echo $_SERVER['REQUEST_URI'] ; ?>" />
                                        <input type="hidden" name="action" value="<?php echo $action ; ?>" />
                                        <input type="hidden" name="UID" value="<?php echo $UID ; ?>" />
                                        <input type="hidden" name="publicado" value="<?php echo $publicado ; ?>" />
                                        <input type="hidden" name="AlbumID" value="<?php echo $AlbumID ; ?>" />
					<input type="submit" id="search-submit" value="Salvar" />
                                    </div>
				</form>	
                                    
				</div>
			</div>
    <?php
    }
    
    
    
}



?>
